home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Java / SlideShow / Sources (skeleton) / ImageNameFilter.java < prev    next >
Encoding:
Java Source  |  2000-09-28  |  688 b   |  22 lines  |  [TEXT/CWIE]

  1. import java.io.File;
  2. import java.io.FilenameFilter;
  3.  
  4. public class ImageNameFilter implements FilenameFilter
  5. {
  6.     /**
  7.      * Tests if a specified file should be included in a file list.
  8.      *
  9.      * @param   dir    the directory in which the file was found.
  10.      * @param   name   the name of the file.
  11.      * @return  <code>true</code> if the name should be included in the file
  12.      *          list; <code>false</code> otherwise.
  13.      * @since   JDK1.0
  14.      */
  15.     public boolean accept(File dir, String name)
  16.     {
  17.         //Need to filter for image files (files whose names end with
  18.         //".jpg", ".gif", or ".jpeg", regardless of case).
  19.         //Insert "ImageNameFilter accept"
  20.     }
  21. }
  22.